package com.diankangwo.factory.dao;

import com.diankangwo.factory.entity.TdOrder;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface TdOrderMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(TdOrder record);

    int insertSelective(TdOrder record);

    TdOrder selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TdOrder record);

    int updateByPrimaryKey(TdOrder record);

    /**
     * 根据查询条件查询端口列表
     */
    List<TdOrder> queryList(Map<String,Object> map);

    /**
     * 根据查询条件查询订单总数
     * @param map
     * @return
     */
    int queryTotal(Map<String,Object> map);

    /**
     * 按日查询评论
     */
    List<TdOrder> queryByDay(String startTime, String endTime);
    /**
     * 按订单状态查询订单
     */
    List<TdOrder> queryByStatus(String orderStatus);

    /**
     * 根据用户UID查询订单
     */
    List<TdOrder> queryByUid(String uid);
    /**
     * 根据订单号查询订单
     */
    TdOrder queryByOrderNo(String orderNo);
}